package com.isoft.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.isoft.entity.DmUser;
import com.isoft.mapper.DmUserMapper;
import com.isoft.service.DmUserService;
import org.springframework.stereotype.Service;

/**
* @author ZhuanZ（无密码）
* @description 针对表【DM_USER(用户表)】的数据库操作Service实现
* @createDate 2025-06-11 16:16:05
*/
@Service
public class DmUserServiceImpl extends ServiceImpl<DmUserMapper, DmUser>
    implements DmUserService{

    @Override
    public DmUser login(DmUser user) {
        QueryWrapper<DmUser> wrapper = new QueryWrapper<>();
        wrapper.eq("USERNAME",user.getUSERNAME());
        wrapper.eq("PASSWORD",user.getPASSWORD());
        DmUser one = getOne(wrapper);
//        one.setToken(one.getUSERNAME());
        return one;
    }
}




